package demo4;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 何华树
 * Date: 2024-08-31
 * Time: 11:58
 */
public class Test1 {
    public static void func(Animal animal) {
        animal.eat();
    }
    public static void main(String[] args) {
        Dog dog = new Dog("旺财",10,9.0);
        func(dog);
        System.out.println("============");
        Cat cat = new Cat("mimi",11,9.0);
        func(cat);
    }
}
